/** Created by CUIJA on 05-19-2017.*/


navMenuService.$inject = ['$http'];

function navMenuService($http) {

    var svc = this;

    svc.menus = [
        {
            state: 'food',
            displayName: 'Food Manage'
        },
        {
            state: 'order',
            displayName: 'Order Manage'
        },
        {
            state: 'info',
            displayName: 'Info'
        }
    ];


    function addMenu(menu) {
        svc.menus.push(menu);
    }

    function getMenus() {
        return svc.menus;
    }

    function logout() {

        return $http.post("/api/merchant/logout");

    }

    return {
        getMenus: getMenus,
        addMenu: addMenu,
        logout: logout
    }
}


module.exports = navMenuService;